using System.Collections.Generic; 
using System.Text; 
using System;
using NHibernate;
using CNRegex.Entity;
using NHibernate.Linq;
using Project.Common;
namespace CNRegex.Dal.SPDal
{
	public class  DalSPSearchBlogs : BaseSPDal
	{	
		private  DalSPSearchBlogs()
		{
			
		}
		public IList<SPSearchBlogs> Invoke(SPSearchBlogsParameter parameter)
		{
			IQuery query = Session.GetNamedQuery("SP_Search_Blogs");
										query.SetParameter("pageSize", parameter.pageSize);
												query.SetParameter("pageIndex", parameter.pageIndex);
												query.SetParameter("catalogID", parameter.catalogID);
												query.SetParameter("keyWords", parameter.keyWords);
												query.SetParameter("orderClick", parameter.orderClick);
												query.SetParameter("orderRecommend", parameter.orderRecommend);
												query.SetParameter("orderCreateDate", parameter.orderCreateDate);
								
						query.SetResultTransformer(new NHibernate.Transform.AliasToBeanResultTransformer(typeof(SPSearchBlogs)));

			IList<SPSearchBlogs> records = query.List<SPSearchBlogs>();
			return records;
					}
	}
	
}
		